<template>
	<u-loadmore :status="status" margin-top="20" margin-bottom="20" @loadmore="loadmore" />
</template>

<script>
export default {
	props: {
		/**
		 * 是否加载中
		 */
		loading: {
			type: Boolean,
			default: false
		},
		/**
		 * 是否加载完成
		 */
		finished: {
			type: Boolean,
			default: false
		}
	},
	data() {
		return {};
	},
	computed: {
		status() {
			if (this.loading) {
				return 'loading';
			}else if (this.finished) {
				return 'nomore';
			}else{
				return 'loadmore';
			}
		}
	},
	methods:{
		loadmore(){
			this.$emit('load-more')
		}
	}
};
</script>
